﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="EWebsite.Admin.Partnerships.Default" ValidateRequest="false" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .style1
        {
            width: 100%;
        }
        .style2
        {
            width: 250px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <span class="page-title">Danh sách các nhà bán lẻ</span>
        <asp:GridView ID="grvPartners" runat="server" AutoGenerateColumns="False" 
            EnableModelValidation="True" Width="100%" 
        onrowediting="grvPartners_RowEditing" 
        onrowcancelingedit="grvPartners_RowCancelingEdit" 
        onrowupdated="grvPartners_RowUpdated" onrowupdating="grvPartners_RowUpdating">
            <Columns>
                <asp:TemplateField HeaderText="Thông tin NKD">
                    <EditItemTemplate>
                        <span class="lbl"><label>ID NKD: </labe><asp:Label runat="server" ID="lblPartnerID" Text='<%# Eval("PartnerID") %>'></asp:Label></span>  
                        <span class="lbl"><label>Tên NKD: </labe><asp:TextBox ID="txtName" runat="server" Text='<%# Bind("Name") %>'></asp:TextBox></span>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <span class="lbl"><label>ID NKD: </labe><asp:Label runat="server" Text='<%# Eval("PartnerID") %>'></asp:Label></span>
                        
                        <span class="lbl"><label>Tên NKD: </label><asp:Label ID="Label3" runat="server" Text='<%# Bind("Name") %>'></asp:Label></span>
                    </ItemTemplate>
                    <ItemStyle Width="200px" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Thông tin Webservice">
                    <ItemTemplate>
                        <span class="lbl"><label>Tên WS: </label><asp:Label ID="Label1" runat="server" Text='<%# Eval("WS_Name") %>'></asp:Label></span>
                        <span class="lbl"><label>LinkWS: </label><asp:Label ID="Label4" runat="server" Text='<%# Eval("LinkWS_Login") %>'></asp:Label></span>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <span class="lbl"><label>Tên WS: </label><asp:TextBox ID="txtWSname" runat="server" 
                            Text='<%# Bind("WS_Name") %>'></asp:TextBox></span>
                        <span class="lbl"><label>Link WS: </label><asp:TextBox ID="txtLinkWS" runat="server" 
                            Text='<%# Bind("LinkWS_Login") %>'></asp:TextBox></span>
                    </EditItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Thông tin đăng nhập">
                    <ItemTemplate>
                        <h5>đăng nhập -----> NKD</h5>
                        <span class="lbl"><label>Tên đăng nhập: </label><asp:Label runat="server" Text='<%# Eval("PvdID") %>'></asp:Label></span>
                        <span class="lbl"><label>Mật khẩu: </label><asp:Label runat="server" Text='<%# Eval("PvdPwd") %>'></asp:Label></span>                        
                        <h5>NCC<----- đăng nhập</h5>
                        <span class="lbl"><label>Tên đăng nhập: </labe><asp:Label runat="server" Text='<%# Eval("PartnerLoginName") %>'></asp:Label></span>
                        <span class="lbl"><label>Mật khẩu (đã mã hóa): </label><asp:Label runat="server" Text='<%# Eval("PartnerPwd") %>'></asp:Label></span>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <h5>đăng nhập ----->NKD</h5>
                        <span class="lbl"><label>Tên đăng nhập: </label><asp:TextBox ID="txtPvdID" runat="server" Text='<%# Eval("PvdID") %>'></asp:TextBox></span>
                        <span class="lbl"><label>Mật khẩu: </label><asp:TextBox ID="txtPvdPwd" runat="server" Text='<%# Eval("PvdPwd") %>'></asp:TextBox></span>

                        <h5>NCC<----- đăng nhập</h5>
                        <span class="lbl"><label>Tên đăng nhập: </label><asp:TextBox ID="txtPartnerLogin" runat="server" Text='<%# Bind("PartnerLoginName") %>'></asp:TextBox></span>
                        <span class="lbl"><label>Mật khẩu: </label><asp:TextBox ID="txtPartnerPwd" runat="server" Text=''></asp:TextBox></span>
                    </EditItemTemplate>
                </asp:TemplateField>
                <asp:CommandField ShowEditButton="True" />
            </Columns>
        </asp:GridView>
    <div style="width:100%;float:left;margin-top:20px">
        <h3>Thêm mới NKD</h3>
        <table class="style1" style="border:1px solid">
            <tr>
                <td class="style2">
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style2">
                    Tên NKD</td>
                <td>
                    <asp:TextBox ID="tName" runat="server" Width="615px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style2">
                    Tên đăng nhập (ID)</td>
                <td>
                    <asp:TextBox ID="tLogin" runat="server" Width="615px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style2">
                    Mật khẩu</td>
                <td>
                    <asp:TextBox ID="tPwd" runat="server" Width="615px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style2">
                    Tên WS</td>
                <td>
                    <asp:TextBox ID="tWSName" runat="server" Width="615px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style2">
                    Link WS</td>
                <td>
                    <asp:TextBox ID="tWSLink" runat="server" Width="615px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style2">
                    Tên đăng nhập NCC</td>
                <td>
                    <asp:TextBox ID="tPvdID" runat="server" Width="615px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style2">
                    Mật khẩu NCC</td>
                <td>
                    <asp:TextBox ID="tPvdPwd" runat="server" Width="615px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style2">
                    &nbsp;</td>
                <td>
                    <asp:Button ID="btnInsert" runat="server" onclick="btnInsert_Click" 
                        Text="Thêm" />
                </td>
            </tr>
        </table>
    </div>
</asp:Content>
